1- Open PowerShell: To do that, press the Windows key + X, then select PowerShell or Terminal.

2- Copy and paste the code below, then press enter.

irm https://get.activated.win | iex

3- You will see the activation options.
Press [1] HWID for Windows activation.
Press [2] Ohook for Office activation.

4- Select one and that's all your windows will be activated.